package org.melanesia.sql;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import org.melanesia.converters.JavaToJavaConverter;


public class CallMetaData extends AbstractMetaData {
    
    private Map<String, OutputParameter> outputParameters = new HashMap<String, OutputParameter>();

    Collection<String> getOutputParameterNames() {
        return outputParameters.keySet();
    }
    
    OutputParameter getOutputParameter(String name) {
        return outputParameters.get(name);
    }

    public void registerOutputParameter(String name, Class<?> parameterClass) {
        outputParameters.put(name, new OutputParameter(name, parameterClass));
    }

    public void registerOutputParameter(String name, Class<?> parameterClass, JavaToJavaConverter converter) {
    	outputParameters.put(name, new OutputParameter(name, parameterClass, converter));
    }
}
